#!/bin/sh
# Refuse a commit that names a particular game anywhere it may not (see CLAUDE.md).
# Enable once per clone:  git config core.hooksPath .githooks
for py in python3 python; do
    if "$py" -c "" > /dev/null 2>&1; then
        exec "$py" "$(git rev-parse --show-toplevel)/tools/check_generic.py" --staged
    fi
done
echo "pre-commit: no Python found to run tools/check_generic.py" >&2
exit 1
